{% extends 'main.html' %}

{% block headerlinks %}
<!--
  ~  BicBucStriim
  ~
  ~  Copyright (c) 2012-2015 Rainer Volz
  ~  Licensed under MIT License, see LICENSE
  ~
  -->

<link rel="related" href="{{page.rot}}/opds/"
	type="application/atom+xml;profile=opds-catalog" title="OPDS index">
<link rel="alternate" href="{{page.rot}}/opds/titleslist/0/" 
	type="application/atom+xml;profile=opds-catalog" title="OPDS catalog: by titles">
{% endblock %}

{% block pid %}id="ptitles"{%endblock%}

{% block content %}
<ul data-role="listview" data-filter="false">	
	{% for book in books %}
		{% if book.initial != "" %}
			<li data-role="list-divider"> {{ book.initial }}</li>
		{% else %}
			{% include "title_entry.html" %}
		{% endif %}
  {% endfor %}
</ul>
{% endblock %}

{% block leftpanel %}
<section data-role="panel" data-display="overlay" data-position="left" id="titles_options_panel">
    <div class="ui-body ui-body-a ui-corner-all">
        <h3>{{page.glob.l10n.pagination_search}}</h3>

        <form action="{{page.rot}}/search/"
              method="get">
            <div data-role="fieldcontain" class="ui-hide-label">
                <label for="search">{{page.glob.l10n.pagination_search_lbl}}</label>
                <input type="search" name="search" id="search" value="{{search}}"
                       placeholder="{{page.glob.l10n.pagination_search_ph}}" autofocus="true"/>
            </div>
        </form>
    </div>
    <div class="ui-body ui-body-a ui-corner-all">
        <h3>{{page.glob.l10n.titles_sort}}</h3>

        <div data-role="controlgroup" data-type="horizontal">
            <a href="{{page.rot}}/titleslist/0/?sort=byReverseDate" class="ui-btn ui-btn-corner-all">{{page.glob.l10n.date}}</a>
            <a href="{{page.rot}}/titleslist/0/?sort=byTitle"
               class="ui-btn ui-btn-corner-all">{{page.glob.l10n.title}}</a>
        </div>
    </div>
</section>
{% endblock %}
